package com.excesys.exsecs.access.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.excesys.exsecs.access.dto.AccessBuildingsDTO;
import com.excesys.exsecs.access.entity.AccessBuildings;
import com.excesys.exsecs.access.vo.AccessBuildingsExcelVO;
import com.excesys.exsecs.common.core.util.R;
import org.springframework.validation.BindingResult;

import java.text.ParseException;
import java.util.List;

public interface AccessBuildingsService extends IService<AccessBuildings> {

    IPage<AccessBuildingsDTO> queryPage(Page page, AccessBuildingsDTO accessBuildingsDTO);

    /**
     * 导入建筑管理
     * @param excelVOList 建筑管理列表
     * @param bindingResult 错误信息列表
     * @return ok fail
     */
    R importBuildings(List<AccessBuildingsExcelVO> excelVOList, BindingResult bindingResult);

    /**
     * 查询全部的资产
     * @return list
     */
    List<AccessBuildingsExcelVO> listBuildings(AccessBuildingsDTO buildingsDTO);

    LambdaQueryWrapper buildQueryWrapper(AccessBuildingsDTO buildingsDTO);

    String GetBuildingCodeBy(String code, int level, String suffix) throws ParseException;


}